package com.shanzmoo.stm.admin.domain.dto;

import cn.hutool.core.bean.BeanUtil;
import com.shanzmoo.db.stm.entity.StmSysMenuEntity;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 仓储用户系统菜单 保存对象
 *
 * @author Gzhao 2021-03-10
 */
@Data
@ApiModel("仓储用户系统菜单-保存对象")
public class StmSysMenuSaveDTO implements Serializable {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "父级菜单")
    private Integer parentId;

    @ApiModelProperty(value = "菜单类型：0-目录，1-菜单")
    private Boolean menuType;

    @ApiModelProperty(value = "菜单图标")
    private String menuIco;

    @ApiModelProperty(value = "菜单名称")
    private String menuName;

    @ApiModelProperty(value = "是否隐藏菜单：0-显示，1-隐藏")
    private Boolean hidden;

    @ApiModelProperty(value = "前端路由地址")
    private String routerUrl;

    @ApiModelProperty(value = "前端组件路径")
    private String componentPath;

    @ApiModelProperty(value = "权限标识")
    private String perms;

    @ApiModelProperty(value = "排序号")
    private Integer menuIndex;

    public StmSysMenuEntity convertEntity() {
        StmSysMenuEntity target = new StmSysMenuEntity();
        BeanUtil.copyProperties(this, target, true);
        return target;
    }
}
